﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;

namespace IHISCETeim.BLL
{
    /// <summary>
    /// 逾期类型(经销商明细,年度汇总)
    /// </summary>
    public enum FXAgentYuQiExpiryType
    {
        经销商明细, 年度汇总
    }
    public class FXAgentYuQiController
    {
        public static string Add(FXAgentYuQiInfo obj)
        {
            return FXAgentYuQiDAL.Add(obj);
        }
        /// <summary>
        /// 导入操作前行删除之前所有的记录,
        ///需区分导入的类别及年份
        /// </summary>
        /// <param name="ExpiryType"></param>
        /// <param name="YearTag"></param>
        /// <returns></returns>
        public static bool Delete( short YearTag)
        {
            return FXAgentYuQiDAL.Delete(YearTag);
        }
        /// <summary>
        /// 获取明细
        ///如果@YearTag为0 则表示获取 ExpiryType　为年度汇总的数据，报表使用
        /// </summary>
        /// <param name="ExpiryType"></param>
        /// <param name="YearTag"></param>
        /// <returns></returns>
        public static DataTable GetList(string ExpiryType, short YearTag)
        {
            return FXAgentYuQiDAL.GetList(ExpiryType, YearTag);
        }
        /// <summary>
        /// 获取有在合作的　放款总台数前　　几名的逾期明细
        /// </summary>
        /// <param name="AliasName">代理商简称</param>
        /// <returns></returns>
        public static DataTable ReportGetDetail(string AliasName)
        {
            return FXAgentYuQiDAL.ReportGetDetail(AliasName);
        }
    }
}
